import axios from '../axios'
export default class phone {
  //根据登录人获取机构id
  static async getCompanyIdByLogin() {
    let res = await axios.get('/business/phone/getCompanyIdByLogin')
    return res.data
  }
  //服务电话总览列表
  static async getAllPhoneList(params) {
    let res = await axios.post('/business/phone/getAllPhoneList', params)
    return res.data
  }
  //服务电话列表
  static async getPhoneList(params) {
    let res = await axios.post('/business/phone/getPhoneList', params)
    return res.data
  }
  //服务电话新增
  static async insertPhone(params) {
    let res = await axios.post('/business/phone/insertPhone', params)
    return res.data
  }
  //服务电话修改
  static async updatePhone(params) {
    let res = await axios.post('/business/phone/updatePhone', params)
    return res.data
  }
  //服务电话详情
  static async getPhoneDetail(id) {
    let res = await axios.get(`/business/phone/getPhoneDetail?id=${id}`)
    return res.data
  }
  //服务电话删除
  static async deletePhone(id) {
    let res = await axios.get(`/business/phone/deletePhone?id=${id}`)
    return res.data
  }
}